package com.yanzhen.util;

import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.yanzhen.model.TypeInfo;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

public class ExcelUtil {

    /*public static void writeExcel(HttpServletResponse response, List<TypeInfo> list) throws IOException {
        ExcelWriter excelWriter= EasyExcel.write(response.getOutputStream()).build();
        //定义工作表对象
        WriteSheet sheet=EasyExcel.writerSheet(0,"sheet1").head(TypeInfo.class).build();
        //往Excel中写入数据
        excelWriter.write(list,sheet);
        //关闭输出流
        excelWriter.finish();
    }*/
}
